package edu.clemson.wcbeck.cft;

import java.util.List;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;

import android.graphics.drawable.Drawable;
import android.media.MediaPlayer;
import android.os.Bundle;

public class CFTTeamMap extends MapActivity{

	MediaPlayer mediaPlayer = CFTTeamSongs.mediaPlayer;
	
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.teammap);		
		
		
		
		MapView mapView = (MapView) findViewById(R.id.mapview);
	    mapView.setBuiltInZoomControls(true);
	    
	    List<Overlay> mapOverlays = mapView.getOverlays();
	    Drawable drawable = this.getResources().getDrawable(R.drawable.ic_qback);
	    MapItemizedOverlay itemizedoverlay = new MapItemizedOverlay(drawable, this);
	    
	    GeoPoint point = new GeoPoint(34687146,-82837601);
	    OverlayItem overlayitem = new OverlayItem(point, "Hola, Mundo!", "I'm in Clemson!");
	    
	    itemizedoverlay.addOverlay(overlayitem);
	    mapOverlays.add(itemizedoverlay);
	}
	
	@Override
	protected boolean isRouteDisplayed() {
		// TODO Auto-generated method stub
		return false;
	}


    @Override
    public void onBackPressed() {
    	// TODO Auto-generated method stub
    	if(mediaPlayer.isPlaying()) { mediaPlayer.stop(); }
    	super.onBackPressed();
    }

}
